﻿@model PostListVM

@{
    ViewBag.Title = "观点";
}

<div class="banner" style="background:url(/Content/Desktop/img/banner/6.jpg)  no-repeat center center;">
</div>

<div class="container page-blog">


    <!-- BLOG ================================================== -->
    <section class="row">
        <div class="col-xs-8 postList">
            <h2 class="title_2">观点</h2>

            @foreach (var post in Model.Posts)
            {
               
                    <div class="item">
                        
                        
                            <h3><a href="@string.Format("/Posts/detail/{0}", post.Id)">@post.Title</a></h3>

                        <div class="thumbnail">
                            @{
                                string thumbnail = !string.IsNullOrEmpty(post.Thumbnail) ? post.Thumbnail : "/Content/public/img/article_no_thumb.png";
                            }
                            <a href="@string.Format("/Posts/detail/{0}",post.Id)">
                                <img src="@thumbnail" alt="@post.Title">
                            </a>
                        </div>
                            <p>@post.Summary</p>
                            <div class="meta">
                                <i class="iconfont icon-time"></i> @string.Format("{0:D}", post.CreatedDate)
                                <i class="iconfont icon-category"></i> <a href="@string.Format("/Posts/articles/{0}", @post.CategoryTitle)">@post.CategoryTitle</a>
                            </div>
                        
                    </div>
             
            }
            <div class="row">
                <div class="col-sm-7">
                    @Html.PagedListPager((IPagedList)Model.Posts, page => Url.Action("Index", new { page, keyword = Model.Keyword, categoryId = Model.CategoryId }))
                </div>
                <div class="col-sm-5">
                    <div class="text-right form-inline hidden">
                        总计 @Model.TotalCount 条
                    </div>
                </div>
            </div>


        </div>



      
        <div class="col-xs-4">
            <aside class="sidebar">
                <div class="m-b-30">
                    @Html.Action("BlogList")
                </div>
                @Html.Action("RecommendPosts")
            </aside>
        </div>

  
           
    </section>

</div>




  
@section footer{
    <script>
        $(function () {
            //当前菜单
            $("#nav li").removeClass("active").eq(3).addClass("active");
        })
    </script>
}